<!-- This HTML file has been created by texi2html 1.52
from ../vice.texi on 23 January 2005 -->
<TITLE>VICE Manual - 6 Settings and resources</TITLE>
</HEAD>
<BODY>
Go to the <A HREF="vice_1.html">first</A>, <A HREF="vice_5.html">previous</A>, <A HREF="vice_7.html">next</A>, <A HREF="vice_16.html">last</A> section, <A HREF="vice_toc.html">table of contents</A>.
<P><HR><P>
<H1><A NAME="SEC39" HREF="vice_toc.html#TOC39">6 Settings and resources</A></H1>
<P>
In the VICE emulators, all the settings are stored in entities known as
called <EM>resources</EM>. Each resource has a name and a value which may
be either an integer or a string. Integer values are often used as
boolean values with the usual convention of using zero for "false"
and any other value for "true".
</P>
<P>
Resource values can be changed via the right-button menu (the
<EM>settings</EM> menu), via command-line options or via the <EM>resource
file</EM>.
</P>
<P>
The <EM>resource file</EM> is a human-readable file containing resource
values: it is called <TT>`vicerc'</TT> and is stored in the directory
<TT>`.vice/'</TT> in the user's home
directory. It is possible to dump the current values of the resources
into that file or load the values stored into that file as the current
values, at any time. This is achieved with the "Save settings" and
"Load settings" right menu items. A third menu item, "Restore
Default Settings", can be used to reset all the values to the factory
defaults.
</P>
<P>
A special resource, <CODE>SaveResourcesOnExit</CODE>, if set to a non zero
value, causes the emulator to ask you if you want to save the current
(changed) settings before exiting, and can be toggled with the "Save
settings on exit" command from the right-button menu.
</P>
<P>
Notice that not all the resources can be changed from the menus; some of
them can only be changed by manually modifying the resource file or by
using command-line options.
</P>
<H2><A NAME="SEC40" HREF="vice_toc.html#TOC40">6.1 Format of resource files</A></H2>
<P>
A resource file is made up of several sections; sections have the
purpose of separating the resources of a certain emulator from the ones
of the other emulators. A section starts with the name of an
emulator in brackets (e.g., <SAMP>`[C64]'</SAMP>) and ends when another section
starts or when the file ends.
</P>
<P>
Every line in a section has the following format:
</P>
<PRE>
RESOURCE=VALUE
</PRE>
<P>
where <CODE>RESOURCE</CODE> is the name of a resource and <CODE>VALUE</CODE> is its
assigned value. Resource names are case-sensitive and resource values
are either strings or integers. Strings must start and end with a
double quote character (<CODE>"</CODE>), while integers must be given in
decimal notation.
</P>
<P>
Here is an example of a stripped-down <TT>`.vice/vicerc'</TT> file:
</P>
<PRE>
[VIC20]
HTMLBrowserCommand="netscape %s"
SaveResourcesOnExit=0
FileSystemDevice8=1
FSDevice8ConvertP00=1
FSDevice8Dir="/home/ettore/cbm/stuff/vic20p00"
FSDevice8SaveP00=1
FSDevice8HideCBMFiles=1
[C64]
HTMLBrowserCommand="netscape %s"
SaveResourcesOnExit=1
FileSystemDevice8=1
FSDevice8ConvertP00=1
FSDevice8Dir="/home/ettore/cbm/stuff/c64p00"
FSDevice8SaveP00=1
FSDevice8HideCBMFiles=1
</PRE>
<P>
Notice that, when resource values are saved with "Save settings", the
emulator only modifies its own section, leaving the others unchanged.
</P>
<H2><A NAME="SEC41" HREF="vice_toc.html#TOC41">6.2 Using command-line options to change resources</A></H2>
<P>
Resources can also be changed via command-line options.
</P>
<P>
Command-line options always override the defaults from <CODE>.vice/vicerc</CODE>,
and their assignments last for the whole session. So, if you specify a
certain command-line option that changes a certain resource from its
default value and then use "Save Settings", the value specified with
the command-line option will be saved back to the resource file.
</P>
<P>
Command-line options can begin with with a minus sign (<SAMP>`-'</SAMP>) or
with a plus sign (<SAMP>`+'</SAMP>). Options beginning with a minus sign
may require an additional parameter, while the ones beginning with the
plus sign never require one.
</P>
<P>
Moreover, options beginning with a plus sign always have a counterpart
with the same name, but with a minus sign; in that case, the option
beginning with a minus sign is used to <EM>enable</EM> a certain
feature, while the one beginning with a plus sign is used to
<EM>disable</EM> the same feature (this is an X11 convention). For
example, <CODE>-mitshm</CODE> enables support of MITSHM, while <CODE>+mitshm</CODE>
Boolean controlling whether the "true" drive emulation is turned on.
<A NAME="IDX86"></A>
<A NAME="IDX87"></A>
<DT><CODE>Drive8Type</CODE>
<DD>
<DT><CODE>Drive9Type</CODE>
<DD>
Integers specifying the model number for drives 8 and 9. Possible values
are <CODE>1541</CODE>, <CODE>1571</CODE>, <CODE>1581</CODE> and <CODE>2031</CODE>.
<A NAME="IDX88"></A>
<DT><CODE>Drive8ParallelCable</CODE>
<DD>
<A NAME="IDX89"></A>
<DT><CODE>Drive9ParallelCable</CODE>
<DD>
Booleans controlling whether the SpeedDOS-compatible cable is emulated or
not for drives 8 and 9.
<A NAME="IDX90"></A>
<DT><CODE>Drive8ExtendImagePolicy</CODE>
<DD>
<A NAME="IDX91"></A>
<DT><CODE>Drive9ExtendImagePolicy</CODE>
<DD>
Integer specifying the policy for 40-track support for drives 8 and 9.
Possible values are <CODE>0</CODE> (never extend), <CODE>1</CODE> (ask on extend),
<CODE>2</CODE> (extend on access).
<A NAME="IDX92"></A>
<DT><CODE>Drive8IdleMethod</CODE>
<DD>
<A NAME="IDX93"></A>
<DT><CODE>Drive9IdleMethod</CODE>
<DD>
Integers specifying the idling method for the drive CPU. Possible values
are <CODE>0</CODE> (none), <CODE>1</CODE> (skip cycles), <CODE>2</CODE> (trap idle).
See section <A HREF="vice_6.html#SEC54">6.7 Drive settings</A>.
<A NAME="IDX94"></A>
<DT><CODE>DriveSyncFactor</CODE>
<DD>
Integer specifying the drive's clock sync factor (see section <A HREF="vice_6.html#SEC54">6.7 Drive settings</A>). Special values <CODE>-1</CODE> and <CODE>-2</CODE> mean PAL and NTSC,
respectively.
<A NAME="IDX95"></A>
<DT><CODE>DosName1541</CODE>
<DD>
<A NAME="IDX96"></A>
<DT><CODE>DosName1571</CODE>
<DD>
<A NAME="IDX97"></A>
<DT><CODE>DosName1581</CODE>
<DD>
<A NAME="IDX98"></A>
<DT><CODE>DosName2031</CODE>
<DD>
Strings specifying the names of the ROM images for the drive emulation.
Go to the <A HREF="vice_1.html">first</A>, <A HREF="vice_5.html">previous</A>, <A HREF="vice_7.html">next</A>, <A HREF="vice_16.html">last</A> section, <A HREF="vice_toc.html">table of contents</A>.